<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/warehouse/base_putbox/Base_PutBox.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/warehouse/base_putbox/Base_PutBox.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '装箱入库',
                name: 'base_putbox/Base_PutBox',
                url: "/Base_PutBox/",
                sortName: "Id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"Mo_Code":"","Wo_Code":"","Box_Code":"","Bar_Code":"","Inv_Code":""});
            const searchFormOptions = ref([[{"title":"箱号","field":"Box_Code","type":"text"},{"title":"产品序列号","field":"Bar_Code","type":"like"}],[{"title":"产品编号","field":"Inv_Code","type":"like"},{"title":"订单号","field":"Mo_Code","type":"like"}],[{"title":"工单号","field":"Wo_Code","type":"like"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Mo_Code',title:'订单号',type:'string',width:180,align:'left',sort:true},
                       {field:'Wo_Code',title:'工单号',type:'string',width:180,align:'left'},
                       {field:'Box_Code',title:'箱号',type:'string',width:180,require:true,align:'left'},
                       {field:'Bar_Code',title:'产品序列号',type:'string',width:180,require:true,align:'left'},
                       {field:'Inv_Code',title:'产品编号',type:'string',width:180,align:'left'},
                       {field:'PutDate',title:'创建日期',type:'datetime',sort:true,width:110,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
